﻿using System;
using System.Collections.Generic;
using Eamon.MeituanDotnetSDK.api.common.response;

namespace Eamon.MeituanDotnetSDK.api.oauth.entity
{
    /// <summary>
    /// https://developer.meituan.com/docs/biz/comm-dev-isv-auth
    /// </summary>
    public class TokenResponse : BaseOAuthResponse<TokenResponse.TokenData>
    {
        public class TokenData
        {
            /// <summary>
            /// 访问令牌 (必填)
            /// </summary>
            public string AccessToken { get; set; }

            /// <summary>
            /// accessToken的访问过期时间【单位秒】，还有多少秒后过期 (必填)
            /// </summary>
            public long ExpireIn { get; set; }

            /// <summary>
            /// 更新令牌 (必填)
            /// </summary>
            public string RefreshToken { get; set; }

            /// <summary>
            /// DynamicTokenResponse：业务授权时传的scope，不传默认为：all (必填)
            /// RefreshTokenResponse：固定：all (必填)
            /// </summary>
            public string Scope { get; set; } = "all";

            /// <summary>
            /// 授权实体的唯一标识 (非必填)
            /// </summary>
            public string OpBizCode { get; set; }

            /// <summary>
            /// 授权实体名称（如果授权实体是门店则为门店名） (非必填)
            /// </summary>
            public string OpBizName { get; set; }
        }
    }
}
